package com.fuchuang.seckillsystem.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget("goods")
public class Goods implements Serializable {
    //商品id
    @Excel(name = "商品id")
    private Integer id;
    
    //商品名称
    @Excel(name = "商品名称")
    private String goodsName;
    
    //商品价格
    @Excel(name = "商品价格")
    private BigDecimal price;
    
    //商品类型
    @Excel(name = "商品类型", replace = {"贷款_0", "存款_1"})
    private Integer type;
    
    //商品详情
    private String detail;
    
    //库存
    private Integer stock;
    
    
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    
    //更改时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    
    //是否有效
    private Integer isValid;
    
    
}